#! /bin/sh -vx
# Copyright 2017-2018 Karl Berry <tex-live@tug.org>
# Copyright 2012 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

LC_ALL=C; export LC_ALL;  LANGUAGE=C; export LANGUAGE

PATH=$LCDF_TYPETOOLS_TREE/cfftot1:$PATH		# May need to run cfftot1, ...
PATH=$LCDF_TYPETOOLS_TREE/t1dotlessj:$PATH	# ... t1dotlessj, ...
PATH=$LCDF_TYPETOOLS_TREE/ttftotype42:$PATH	# ... or ttftotype42.
export PATH 
TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF 
ENCFONTS=.:$srcdir/tests; export ENCFONTS

rm -f Ant* a_enhg3c.enc

$LCDF_TYPETOOLS_TREE/otftotfm/otftotfm -e texnansx --glyphlist=$srcdir/$LCDF_TYPETOOLS_TREE/glyphlist.txt \
	-p -fkern -fliga \
	$srcdir/tests/antpolt-regular.otf Ant >Ant.map \
	&& sed -e '1d' Ant.pl >Ant.plx \
	&& diff Ant.plx $srcdir/tests/Ant.pl \
	&& diff Ant.map $srcdir/tests/Ant.map \
	&& sed -e '4d;/line:/,/Ant/d' a_enhg3c.enc >Ant.enc \
	&& diff Ant.enc $srcdir/tests/Ant.enc \
	&& cmp -s AntPolt-Regular.pfb $srcdir/tests/Ant.pfb || exit 1

